package com.jdy.haoduoai.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

import com.jdy.haoduoai.fragment.BaseFragment;

import java.util.List;

public class MyFragmentPagerAdapter2 extends FragmentPagerAdapter {

  List<BaseFragment> mList;

  @Override
  public void setPrimaryItem(ViewGroup container, int position, Object object) {
    
    super.setPrimaryItem(container, position, object);
  }

  public MyFragmentPagerAdapter2(FragmentManager fm, List<BaseFragment> list) {
    super(fm);
    this.mList = list;
  }

  @Override
  public Fragment getItem(int arg0) {
    
    return this.mList.get(arg0);
  }

  @Override
  public int getCount() {
    
    return this.mList.size();
  }
}
